<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>所有新闻(管理员)</title>
    <link href="../CSS/Admin_News.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="admin-all_news">
    <table>
        <tr id="tr1">
            <td class="news-title">标题</td><td>作者</td><td>类型</td><td>时间</td><td>操作(修改)</td><td>操作(删除)</td>
        </tr>
        <tr>
            <td class="news-title">标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题</td>
            <td>作者</td><td>类型类型</td><td>2099-90-90 09:09:09</td>
            <td class="update" onclick="Updatenews(this)">修改</td><td class="delete" onclick="Deletenews(this)">删除</td>
        </tr>
    </table>
</div>
<script type="text/javascript">
    function Updatenews(but) {
        var re =/<td class="news-title">(.*?)<\/td>/;
        var test=but.parentNode.innerHTML;
        var inner = test.match(re);
        console.log(inner[1]);
    }
    function Deletenews(but) {
        var re =/<td class="news-title">(.*?)<\/td>/;
        var test=but.parentNode.innerHTML;
        var inner = test.match(re);
        console.log(inner[1]);
    }
</script>
</body>
</html>